Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ens and async_ens to call resolver only if coin_type is specified #3584

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

abhinay
Copy link
Contributor

@abhinay abhinay commented Jan 18, 2025

What was wrong?

Previously, in ens.py and async_ens.py, the method address() always called self.resolver(name) even when coin_type was None. This meant an unnecessary call in scenarios where the resolver wasn’t actually used.

Related to Issue #3582

Closes #3582

How was it fixed?

Moved the self.resolver(name) call inside the else block. Now it’s only triggered if coin_type is not None. This prevents an extra network call when coin_type is absent.

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@fselmo fselmo force-pushed the refactor-ens-resolver-call branch from 2beca7b to 7b14d37 Compare January 31, 2025 15:37
@fselmo fselmo merged commit 936ee88 into ethereum:main Jan 31, 2025
83 of 85 checks passed
@fselmo
Copy link
Collaborator

fselmo commented Jan 31, 2025

Thanks again. Merged 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Move r = await self.resolver(name) call into the else block in async_ens.py?
2 participants